home *** CD-ROM | disk | FTP | other *** search
- SNIPPETS Rationale
- ------------------
-
-
- Where do SNIPPETS come from?
-
- I'm constantly on the lookout for new SNIPPETS material. The goal of SNIPPETS
- has been to collect useful pieces of code that would be free for reuse. This
- limits consideration to code that is either explicitly in the public domain
- or which carries a free use license with few or no restrictions which would
- prevent its use. Current SNIPPETS material has been collected from the
- FidoNet C_Echo, comp.lang.c on the Internet, various public domain archives,
- and my own commercial library (MFL).
-
-
- How are SNIPPETS selected?
-
- As the collection has evolved, it's taken on distinguishing characteristics
- based largely, I'm afraid, on what sorts of things interest me. A primary
- focus of SNIPPETS is portability - first of all between DOS compilers, and
- secondly with the larger world of Unix and other platforms. I tend to be
- interested in the same problem domain as Posix - system and utility
- functions. What I'm not interested in trying to include are things which
- really require massive amounts of code to do right (e.g. GUIs, databases,
- interrupt-driven comm I/O, game-quality graphics, multimedia, etc.) and are
- therefore better addressed by large single-purpose packages, whether
- commercial or otherwise.
-
- In addition to the utility stuff, I also snag anything that seems moderately
- obscure (e.g. ISBN validation, wind chill, sunrise/set time, etc.) Whether I
- need to know these things or not, someone sometime will need to be able to do
- these and I like to be able to provide the option of a simple canned solution
- rather than sending them on a research spree.
-
-
- What makes one SNIPPETS entry "better" than other candidates?
-
- Anything that enhances portability or usability is better in my book. Note
- that I'm not necessarily soliciting completion to full library standards. As
- the name SNIPPETS implies, many of the entries knowingly have minimal
- bullet-proofing. Most of the entries I've excerpted from MFL differ only in
- that my commercial code provides bullet-proof error trapping at the cost of
- slightly obfuscating the algorithms. In cases where error trapping would, in
- my opinion, make the algorithm harder to follow, I've generally opted for
- clarity over safety. This was a conscious decision since the target audience
- for SNIPPETS includes both newbies and experienced programmers. The pros will
- recognize the shortcomings and know to add the error trapping, but the tyros
- can tend to get lost. My yardstick on this has been feedback. If too many
- tyros have to ask how it works, then I try to simplify and/or make the
- underlying algorithm stand out. If too many folks complain about it being
- unsafe, I add more bullet-proofing. When I hear as little from both sides as
- possible, I figure I've achieved the desired balance.
-